#pragma once

extern CRender render;

class CGame
{
public:
	CGame()
	{
		m_exit = false;

		Render.init();
		Render.clcolor(color::gray());
		m_spr.load("win.dds");
	}
	~CGame()
	{
		
	}
	
	void Exit()
	{
		m_exit = true;
	}
	void OnUpdate()
	{
		if(Input.hits[key::esc])
			exit();
	}
	void OnRender()
	{
		Renderer.Clear(true,true);
		m_spr.Draw(0,0);
		Renderer.Swap();
	}

private:
	bool	m_exit;
	CSprite m_spr;
};